Leadtools.ColorConversion Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.5.7
ConvertToImage(Byte[],Int32,RasterImage,Int32,Int32,Int32,Int32) Method
See Also 
Leadtools.ColorConversion Namespace > RasterColorConverter Class > ConvertToImage Method : ConvertToImage(Byte[],Int32,RasterImage,Int32,Int32,Int32,Int32) Method




srcBuffer
A byte array containing the input buffer.
srcBufferOffset
Offset to the first byte of the srcBuffer data buffer.
image
An RasterImage object that will hold the converted data.
width
Width of pixels to be processed.
height
Height of pixels to be processed.
inAlign
Each scanline in the input buffer is a multiple of inAlign bytes.
outAlign
Each scan line in the output buffer is a multiple of outAlign bytes.
Converts image data in a buffer from one color conversion model to RGB\BGR, and sets the output as RasterImage.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub ConvertToImage( _
   ByVal srcBuffer() As Byte, _
   ByVal srcBufferOffset As Integer, _
   ByVal image As RasterImage, _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal inAlign As Integer, _
   ByVal outAlign As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterColorConverter
Dim srcBuffer() As Byte
Dim srcBufferOffset As Integer
Dim image As RasterImage
Dim width As Integer
Dim height As Integer
Dim inAlign As Integer
Dim outAlign As Integer
 
instance.ConvertToImage(srcBuffer, srcBufferOffset, image, width, height, inAlign, outAlign)
C# 
public void ConvertToImage( 
   byte[] srcBuffer,
   int srcBufferOffset,
   RasterImage image,
   int width,
   int height,
   int inAlign,
   int outAlign
)
Managed Extensions for C++ 
public: void ConvertToImage( 
   byte[]* srcBuffer,
   int srcBufferOffset,
   RasterImage image,
   int width,
   int height,
   int inAlign,
   int outAlign
) 
C++/CLI 
public:
void ConvertToImage( 
   array<byte>^ srcBuffer,
   int srcBufferOffset,
   RasterImage image,
   int width,
   int height,
   int inAlign,
   int outAlign
) 

Parameters

srcBuffer
A byte array containing the input buffer.
srcBufferOffset
Offset to the first byte of the srcBuffer data buffer.
image
An RasterImage object that will hold the converted data.
width
Width of pixels to be processed.
height
Height of pixels to be processed.
inAlign
Each scanline in the input buffer is a multiple of inAlign bytes.
outAlign
Each scan line in the output buffer is a multiple of outAlign bytes.

Example

For an example, refer to ConversionWhitePoint.WhitePoint.

Remarks

The active conversion method is specified in the ConversionParameters object when calling the RasterColorConverter.Start method. To change the active method, use the RasterColorConverter.SetParameters method. Only methods supported by the initialized converter should be specified.

The conversion is done if the BGR or RGB Color Space was specified as the destination format when the Start method was called.

For more information about Alignment Parameters, refer to Alignment Parameters.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also